/*
 * =====================================================================================
 *
 *       Filename:  testConstraint.cpp
 *
 *    Description:  Test for constraint
 *
 *        Version:  1.0
 *        Created:  20/07/12 14:52:17
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  Moos Hueting (mh), mooshueting@gmail.com
 *   Organization:  
 *
 * =====================================================================================
 */
#include <stdlib.h>
#include <cv.h>
#include <highgui.h>
#include "constraint.h"
#include "constraintSet.h"
#include "features/char_features.h"
#include <iostream>

using namespace cv;
using namespace std;

int main() {
    Constraint com(&complexity, 100);
    Constraint con(&convexity, 100);

    ConstraintSet cs;
    cs.addConstraint(com);
    cs.addConstraint(con);

    Mat im = imread("/home/moos/ucl/proj/data/Arial/a.png", CV_LOAD_IMAGE_GRAYSCALE);
    threshold(im,im,100,255,THRESH_BINARY);

    cout << cs.getError(im) << endl;

}
